package com.mtsmda.preparationforjavainterview.jinterview;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

import com.mtsmda.preparationforjavainterview.jinterview.InnerClassInnerInInterface.Color;

public class App {
	public static void main(String[] args) {
		// ------------------ http://habrahabr.ru/post/133237/
		/*
		 * StaticInitClassAndNonStaticInit classAndNonStaticInit = null; for
		 * (int i = 0; i < 25; i++) { classAndNonStaticInit = new
		 * StaticInitClassAndNonStaticInit();
		 * System.out.println(classAndNonStaticInit.toString()); }
		 * 
		 * for (int i = 0; i < classAndNonStaticInit.getStrings().size(); i++) {
		 * System.out.println(classAndNonStaticInit.getStrings().get(i)); }
		 */

		// ------------------------------------------------------------------------------------------

		/*
		 * Color color = new Color(255, 255, 255); InnerClassInnerInInterface
		 * iciii = new InnerClassInnerInInterfaceImpl( color);
		 * System.out.println(iciii.getColor());
		 */

		// ------------------------------------------------------------------------------------------

		/*
		 * Covarience covarience = new Covarience(); Covarience clone =
		 * covarience.clone(); if(covarience.equals(clone)){
		 * System.out.println("true"); }else{ System.out.println("false"); }
		 * 
		 * if(covarience == clone){ System.out.println("true"); }else{
		 * System.out.println("false"); }
		 */

		// ------------------------------------------------------------------------------------------
		/*
		 * String firstWorld = new String("Dima"); String secondWorld = new
		 * String("nmitrii");
		 * 
		 * ClassGoTO.hasSameLetter(firstWorld, secondWorld);
		 * System.out.println("Out " + ClassGoTO.getSameChar());
		 */

		// ------------------------------------------------------------------------------------------

		int[] ar = { 15, 21, 17, 90, 300, 89 };
		ImmutableInnerClass.example(ar);
		ImmutableInnerClass.arrayPrint(ar);
		ImmutableInnerClass.arrayTwice(ar);
		ImmutableInnerClass.arrayPrint(ar);

		// ------------------------------------------------------------------------------------------
		String дима = new String("дима");
		System.out.println(дима);
		// ------------------------------------------------------------------------------------------
		List<Integer> integers = new LinkedList<Integer>();
		Collections.addAll(integers, 15, 18, 19, 300, 500);
		for(Integer i : integers.subList(0, integers.size() - 1)){
			System.out.println(i);
		}
		
		System.out.println();
		for(Integer i : integers.subList(1, integers.size())){
			System.out.println(i);
		}
		
		System.out.println();
		for(Integer i : integers){
			System.out.println(i);
		}
		List<String> strings = new ArrayList<String>(Arrays.asList("GGG"));
		// ------------------------------------------------------------------------------------------
		// ------------------------------------------------------------------------------------------
		// ------------------------------------------------------------------------------------------
	}
}